package com.youkeyi.ddy.cloud.basic.pub.organization.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;

/**
 * <p>
 * 组织（部门）表
 * </p>
 *
 * @author xiawang.liu
 * @since 2024-05-04
 */
@TableName("sys_organization")
public class SysOrganization extends Model<SysOrganization> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField("primary_key")
    private String primaryKey;

    /**
     * 解决并发更新问题,每次更新需要用 uuid 做比较判断数据是否已变更
     */
    @TableField("uuid")
    private String uuid;

    /**
     * 旧的uuid,mybatis 更新时需要
     */
    @TableField("old_uuid")
    private String oldUuid;

    /**
     * 主体key
     */
    @TableField("corp_key")
    private String corpKey;

    /**
     * 组织名称
     */
    @TableField("name")
    private String name;

    /**
     * 组织code
     */
    @TableField("code")
    private String code;

    /**
     * 组织级别
     */
    @TableField("level")
    private Integer level;

    /**
     * 组织类型
     */
    @TableField("type")
    private Integer type;

    /**
     * 序号
     */
    @TableField("sort")
    private Integer sort;

    /**
     * 父级组织Key
     */
    @TableField("parent_key")
    private String parentKey;

    /**
     * 组织层级路径
     */
    @TableField("path")
    private String path;

    /**
     * 是否共享 0 否 1 共享
     */
    @TableField("is_share")
    private Integer isShare;

    /**
     * 组织职责
     */
    @TableField("responsibility")
    private String responsibility;

    /**
     * 负责人员工key
     */
    @TableField("leader_employee_key")
    private String leaderEmployeeKey;

    /**
     * 负责人员工名
     */
    @TableField("leader_employee_name")
    private String leaderEmployeeName;

    /**
     * 负责人员工手机号
     */
    @TableField("leader_employee_phone")
    private String leaderEmployeePhone;

    /**
     * 固定电话
     */
    @TableField("telephone")
    private String telephone;

    /**
     * 组织地址
     */
    @TableField("address")
    private String address;

    /**
     * 组织邮箱
     */
    @TableField("email")
    private String email;

    /**
     * 组织描述
     */
    @TableField("`desc`")
    private String desc;

    /**
     * 是否删除
     */
    @TableField("is_deleted")
    private Integer isDeleted;

    /**
     * 创建人
     */
    @TableField("create_user_key")
    private String createUserKey;

    /**
     * 创建人名称
     */
    @TableField("create_user_name")
    private String createUserName;

    /**
     * 创建时间
     */
    @TableField("create_time")
    private Date createTime;

    /**
     * 更新人
     */
    @TableField("update_user_key")
    private String updateUserKey;

    /**
     * 更新人名称
     */
    @TableField("update_user_name")
    private String updateUserName;

    /**
     * 更新时间
     */
    @TableField("update_time")
    private Date updateTime;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
    public String getPrimaryKey() {
        return primaryKey;
    }

    public void setPrimaryKey(String primaryKey) {
        this.primaryKey = primaryKey;
    }
    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }
    public String getOldUuid() {
        return oldUuid;
    }

    public void setOldUuid(String oldUuid) {
        this.oldUuid = oldUuid;
    }
    public String getCorpKey() {
        return corpKey;
    }

    public void setCorpKey(String corpKey) {
        this.corpKey = corpKey;
    }
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }
    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }
    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }
    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }
    public String getParentKey() {
        return parentKey;
    }

    public void setParentKey(String parentKey) {
        this.parentKey = parentKey;
    }
    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }
    public Integer getIsShare() {
        return isShare;
    }

    public void setIsShare(Integer isShare) {
        this.isShare = isShare;
    }
    public String getResponsibility() {
        return responsibility;
    }

    public void setResponsibility(String responsibility) {
        this.responsibility = responsibility;
    }
    public String getLeaderEmployeeKey() {
        return leaderEmployeeKey;
    }

    public void setLeaderEmployeeKey(String leaderEmployeeKey) {
        this.leaderEmployeeKey = leaderEmployeeKey;
    }
    public String getLeaderEmployeeName() {
        return leaderEmployeeName;
    }

    public void setLeaderEmployeeName(String leaderEmployeeName) {
        this.leaderEmployeeName = leaderEmployeeName;
    }
    public String getLeaderEmployeePhone() {
        return leaderEmployeePhone;
    }

    public void setLeaderEmployeePhone(String leaderEmployeePhone) {
        this.leaderEmployeePhone = leaderEmployeePhone;
    }
    public String getTelephone() {
        return telephone;
    }

    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }
    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }
    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }
    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
    public Integer getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }
    public String getCreateUserKey() {
        return createUserKey;
    }

    public void setCreateUserKey(String createUserKey) {
        this.createUserKey = createUserKey;
    }
    public String getCreateUserName() {
        return createUserName;
    }

    public void setCreateUserName(String createUserName) {
        this.createUserName = createUserName;
    }
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public String getUpdateUserKey() {
        return updateUserKey;
    }

    public void setUpdateUserKey(String updateUserKey) {
        this.updateUserKey = updateUserKey;
    }
    public String getUpdateUserName() {
        return updateUserName;
    }

    public void setUpdateUserName(String updateUserName) {
        this.updateUserName = updateUserName;
    }
    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "SysOrganization{" +
            "id=" + id +
            ", primaryKey=" + primaryKey +
            ", uuid=" + uuid +
            ", oldUuid=" + oldUuid +
            ", corpKey=" + corpKey +
            ", name=" + name +
            ", code=" + code +
            ", level=" + level +
            ", type=" + type +
            ", sort=" + sort +
            ", parentKey=" + parentKey +
            ", path=" + path +
            ", isShare=" + isShare +
            ", responsibility=" + responsibility +
            ", leaderEmployeeKey=" + leaderEmployeeKey +
            ", leaderEmployeeName=" + leaderEmployeeName +
            ", leaderEmployeePhone=" + leaderEmployeePhone +
            ", telephone=" + telephone +
            ", address=" + address +
            ", email=" + email +
            ", desc=" + desc +
            ", isDeleted=" + isDeleted +
            ", createUserKey=" + createUserKey +
            ", createUserName=" + createUserName +
            ", createTime=" + createTime +
            ", updateUserKey=" + updateUserKey +
            ", updateUserName=" + updateUserName +
            ", updateTime=" + updateTime +
        "}";
    }
}
